home *** CD-ROM | disk | FTP | other *** search
/ mail.altrad.com / 2015.02.mail.altrad.com.tar / mail.altrad.com / TEST / office german / PROPLUS.WW / PROPLSWW.CAB / FL_autoexpce_cs_137002________.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Text File  |  2006-10-26  |  8KB  |  154 lines

  1. // This file contains DisplayAttribute defines for types from Windows CE assemblies
  2. // If any changes are made, its needs to be recompiled while referencing CE assemblies
  3.  
  4. #region Using directives
  5.  
  6. using System;
  7. using System.Diagnostics;
  8. using System.Drawing;
  9. using System.IO;
  10. using System.Reflection;
  11. using System.Security;
  12. using WinForms = System.Windows.Forms;
  13. using SQLTypes = System.Data.SqlTypes;
  14.  
  15. #endregion
  16.  
  17. // mscorlib
  18. [assembly: DebuggerDisplay(@"\{Name = {Name} FullName = {FullName}}", Target = typeof(Type))]
  19.  
  20. // System.Drawing
  21. [assembly: DebuggerDisplay(@"\{Name = {Name} Size={Size}}", Target = typeof(Font))]
  22. [assembly: DebuggerDisplay(@"\{Name = {m_strName}}", Target = typeof(FontFamily))]
  23. [assembly: DebuggerDisplay(@"\{Color = {m_color}}", Target = typeof(Pen))]
  24. [assembly: DebuggerDisplay(@"\{X = {m_x} Y = {m_y}}", Target = typeof(Point))]
  25. [assembly: DebuggerDisplay(@"\{X = {m_x} Y = {m_y} Width = {m_cx} Height = {m_cy}}", Target = typeof(Rectangle))]
  26. [assembly: DebuggerDisplay(@"\{X = {m_x} Y = {m_y} Width = {m_cx} Height = {m_cy}}", Target = typeof(RectangleF))]
  27. [assembly: DebuggerDisplay(@"\{Width = {m_cx} Height = {m_cy}}", Target = typeof(Size))]
  28. [assembly: DebuggerDisplay(@"\{Width = {m_cx} Height = {m_cy}}", Target = typeof(SizeF))]
  29. [assembly: DebuggerDisplay(@"\{Color = {m_color}}", Target = typeof(SolidBrush))]
  30.  
  31.  
  32.  
  33. // System.Windows.Forms
  34. [assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::Button))]
  35. [assembly: DebuggerDisplay(@"\{Text = {Text} CheckState = {CheckState}}", Target = typeof(WinForms::CheckBox))]
  36. [assembly: DebuggerDisplay(@"\{Value = {Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::HScrollBar))]
  37. [assembly: DebuggerDisplay(@"\{Index = {index}}", Target = typeof(WinForms::ItemChangedEventArgs))]
  38. [assembly: DebuggerDisplay(@"\{Index = {m_iIndex} NewValue = {m_newCheckValue} CurrentValue = {m_CurrentValue}}", Target = typeof(WinForms::ItemCheckEventArgs))]
  39. [assembly: DebuggerDisplay(@"\{KeyData = {m_keyData}}", Target = typeof(WinForms::KeyEventArgs))]
  40. [assembly: DebuggerDisplay(@"\{KeyChar = {m_ch}}", Target = typeof(WinForms::KeyPressEventArgs))]
  41. [assembly: DebuggerDisplay(@"\{SelectedItem = {Text}}", Target = typeof(WinForms::ListBox))]
  42. [assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::ListViewItem))]
  43. [assembly: DebuggerDisplay(@"\{X = {m_x} Y = {m_y} Button = {button}}", Target = typeof(WinForms::MouseEventArgs))]
  44. [assembly: DebuggerDisplay(@"\{Value = {Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::NumericUpDown))]
  45. [assembly: DebuggerDisplay(@"\{ClipRectangle = {m_rcClip}}", Target = typeof(WinForms::PaintEventArgs))]
  46. [assembly: DebuggerDisplay(@"\{Value = {Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::ProgressBar))]
  47. [assembly: DebuggerDisplay(@"\{Text = {Text} Checked = {Checked}}", Target = typeof(WinForms::RadioButton))]
  48. [assembly: DebuggerDisplay(@"\{Bounds = {Bounds} WorkingArea = {WorkingArea}}", Target = typeof(WinForms::Screen))]
  49. [assembly: DebuggerDisplay(@"\{MinExtra = {MinExtra} MinSize = {MinSize}}", Target = typeof(WinForms::Splitter))]
  50. [assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::TextBox))]
  51. [assembly: DebuggerDisplay(@"\{Interval = {m_msec}}", Target = typeof(WinForms::Timer))]
  52. [assembly: DebuggerDisplay(@"\{{Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::TrackBar))]
  53. [assembly: DebuggerDisplay(@"\{Text = {m_strText}}", Target = typeof(WinForms::TreeNode))]
  54. [assembly: DebuggerDisplay(@"\{{Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::VScrollBar))]
  55.  
  56. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(Exception))]
  57. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ApplicationException))]
  58. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ArgumentException))]
  59. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ArgumentNullException))]
  60. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ArgumentOutOfRangeException))]
  61. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ArithmeticException))]
  62. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(DivideByZeroException))]
  63. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(DllNotFoundException))]
  64. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ApplicationException))]
  65. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(IndexOutOfRangeException))]
  66. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(InvalidCastException))]
  67. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(MemberAccessException))]
  68. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(MethodAccessException))]
  69. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(NullReferenceException))]
  70. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(StackOverflowException))]
  71. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(SystemException))]
  72. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(TypeLoadException))]
  73. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(FileNotFoundException))]
  74. [assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(SecurityException))]
  75.  
  76. // The attributes below can be useful to uncomment if ToString evaluation is disabled. 
  77. //
  78. //[assembly: DebuggerDisplay("{Month}/{Day}/{Year} {Hour}:{Minute}:{Second}", Target = typeof(DateTime))]
  79. //[assembly: DebuggerDisplay(@"\{Value = {Value}}", Target = typeof(WinForms::DateTimePicker))]
  80. //[assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::LinkLabel))]
  81. //[assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::Label))]
  82. //[assembly: DebuggerDisplay(@"\{{SelectionStack = {SelectionStart} SelectionEnd = {SelectionEnd}}", Target = typeof(WinForms::MonthCalendar))]
  83. //[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlInt64))]
  84. //[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlDateTime))]
  85. //[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlInt32))]
  86. //[assembly: DebuggerDisplay("{Value}", Target = typeof(SQLTypes::SqlMoney))]
  87. //[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlString))]
  88. //[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlSingle))]
  89. //[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlInt16))]
  90. //[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlByte))]
  91. //[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlDouble))]
  92.  
  93. namespace System.Diagnostics {
  94.  
  95.     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Assembly, AllowMultiple = true)]
  96.     public sealed class DebuggerDisplayAttribute : Attribute
  97.     {
  98.         private string name;
  99.         private string value;
  100.         private string type;
  101.         private string targetName;
  102.         private Type target;
  103.  
  104.         public DebuggerDisplayAttribute(string value)
  105.         {
  106.             if( value == null ) {
  107.                 this.value = "";
  108.             }
  109.             else {
  110.                 this.value = value;
  111.             }
  112.             name = "";
  113.             type = "";
  114.         }   
  115.  
  116.         public string Value
  117.         {
  118.             get { return this.value; }
  119.         }
  120.  
  121.         public string Name
  122.         {
  123.             get { return name; }
  124.             set { name = value; }
  125.         }
  126.  
  127.         public string Type
  128.         {
  129.             get { return type; }
  130.             set { type = value; }
  131.         }
  132.  
  133.         public Type Target
  134.         {
  135.             set { 
  136.                 if( value == null) {
  137.                     throw new ArgumentNullException("value");
  138.                 }
  139.                 
  140.                 targetName = value.AssemblyQualifiedName; 
  141.                 target = value;
  142.             }
  143.             get { return target; }
  144.         }
  145.  
  146.         public string TargetTypeName
  147.         {
  148.             get { return targetName; }
  149.             set { targetName = value; }
  150.     
  151.         }
  152.     }
  153. }
  154.